<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>

<script type="text/javascript">
	
{
	let obj = {};
	let arr = [];

	({ foo: obj.prop, bar: arr[0] } = { foo: "aaa", bar: true });

	console.error("obj.prop = " + obj.prop);
	console.error("arr[0] = " + arr[0]);
}
console.error("-----------------------------------");
{
	let { x = 3 } = {};
	console.error("x = " + x);
}
console.error("-----------------------------------");
{
	let { x, y = 5 } = { x: 1 };
	console.error("x = " + x);
	console.error("y = " + y);
}
console.error("-----------------------------------");
{
	let { message: msg  = "something went wrong"} = { message: "123" };
	console.error("msg = " + msg);
}

</script>

</body>
</html>